<template>
    <div class="shop-cart-sticky" v-show="visible">
        <shopCart
            ref="shopCart"
            :selectFoods="selectFoods"
            :deliveryPrice="deliveryPrice"
            :minPrice="minPrice"
            :fold="fold"
            :sticky=true
        >
        </shopCart>
    </div>
</template>
<script>
import shopCart from "components/shopcart/shopcart"
import popupMixin from "common/mixins/popup"
export default{
    mixins: [popupMixin],
    name:"show-cart-sticky",
    props:{
        selectFoods:{
            type:Array,
            default(){
                return []
            },
        },
        deliveryPrice: {
            type: Number,
            default: 0
            },
        minPrice: {
            type: Number,
            default: 0
            },
        fold:{
            type:Boolean,
            default:false
        },
        list:{
            type:Object,
            default(){ 
                return {}
            }
        },
    },
    data () {
        return {
            visible:false
        }
    },
    methods: {
        drop(el){
            this.$refs.shopCart.drop(el)
        }
    },
    components: {
        shopCart
    }
}
</script>
<style lang="stylus" rel="stylesheet/stylus">
    .shop-cart-sticky
      position : absolute
      bottom  : 0
      left : 0
      z-index : 999
      width :100%
      height :48px
</style>